﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Runtime.Serialization;
using MobiMenu.Restaurant.Web.Utility;
using MobiMenu.Restaurant.Web;
using System.Text;

public partial class test_Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        OutputData o = new OutputData()
        {
            PageSize = 10,
            Caption = "Order"
        };

        o.Columns.AddRange(new ColumnData[]{new ColumnData(){Field="id",Title="ID"},
        new ColumnData(){Field="orderedTime",Title="TIME"},
        new ColumnData(){Field="status",Title="STATUS"}});

        var sb = new StringBuilder();
        sb.Append("var outputData=").Append(JsonHelper<OutputData>.WriteObject(o)).Append(";");
        Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "OutputData", sb.ToString(), true);
    }
}